home *** CD-ROM | disk | FTP | other *** search
-
- Help Files Help
-
-
- version: 1.3
- created: 07/17/00 {12:22:13 pm}
- last update: 11/30/00 {08:14:50 pm}
-
-
-
- Introduction
-
-
- This document deals with three different topics. The first provides
- information on Alpha's auto-marking / hyperizing routines for Help files.
- The second introduces "AlphaBits", a forum for addressing user questions
- and improving Alpha's documentation. The third poses possibilities for
- future directions of Alpha's help facilities.
-
-
- Listservs devoted to Alpha
-
-
- There are two listservs set up to support Alpha's development and use. The
- first, known as Alpha-D (for Alpha Developers) is where one can suggest
- improvements for Alpha or its Tcl library, and to discuss bugs. To
- subscribe, email <LISTSERV@LISTSERV.SYR.EDU> and, in the text of your
- message (not the subject line), write:
-
- SUBSCRIBE ALPHA-D
-
- (See also the help file "Bug Reports and Debugging". Alpha has a
- sophisticated bug reporting and tracking system, at
-
- <http://www.maths.mq.edu.au/~steffen/bugzilla/>
-
- Please use Bugzilla, since it will help us (and you) to keep track of bugs,
- potential workarounds, and when they are finally fixed.)
-
- The second listserv is called AlphaBits, and is intended for a less
- technical audience (i.e. the typical Alpha user that simply wants to know
- how to use the program more efficiently.) This is also a forum for
- discussing Alpha's documentation, and to submit suggestions for various
- Help files. To subscribe, email Donavan Hall at <hall@magnet.fsu.edu> and
- let him know that you want to sign up.
-
-
- ======================================================================
-
-
- Auto Marking Help Files
-
-
- Alpha v 7.4 has introduced auto-marking / hyperizing capabilities for Help
- files. If a file that contains no colors is opened through the Help Menu,
- Alpha will go through a series of hyperizing / marking routines using
- help::colourHeadingsEtc (in "help.tcl").
-
- Auto-marking / hyperizing files must be "clean" before they are opened
- through the Help menu -- that is, they must not have any colors or hypers
- in them. If this is the case, Alpha will mark the file and perform a
- series of "search and hyperize" routines following the guidelines below.
-
- These routines makes writing Help files much easier -- no need to
- individually "Link To File" anymore !! (This means that help files can
- also be marked and hyperized by Alphatk.)
-
- Help files will only be auto-marked / hyperized once, and then the hypers
- will be saved in the resource fork. (Note: This will not change the "save"
- date of the file. Installation of future versions of Alpha can still
- overwrite older existing files.)
-
- See these "Alpha Developers --> Marking" menu item procedures for details
- on what these auto-marking / hyperizing routines actually do:
-
-
- proc: help::hyperiseEmailAddresses
- proc: help::hyperiseUrls
- proc: help::colourHeadingsEtc
-
-
- The proc: help::openDirect uses these procedures, setting additional window
- information (read-only 1, dirty 0, tabsize 4). The Help file is then
- closed and re-opened.
-
- The following sections describe the syntax required to achieve marks,
- hypers and colors in these files. Note: there is an additional marking
- regime, proc: help::markTclCommands, that might be used instead for
- particular files. See the "Exceptions" section below.
-
-
- Marks
-
-
- To create a mark, start the line with <tab><space><space><tab>. This will
- be stripped from the mark name. Subsequent spaces and tabs will indent the
- mark's name, which is useful for sub-sections. (Note that a tab will
- indent only one space.) If nothing follows the <tab><space><space><tab>, a
- section divider will appear in the mark menu, and the next alphanumeric
- line will be colored red and underlined (as if it were a mark.)
-
- Note that the proc: help::openDirect will automatically convert tab sizes to 4.
-
-
- Colors
-
-
- Any line that begins with one (and only one) tab will be colored blue,
-
- like this. Subsequent lines that begin with a tab
- will be colored blue as well.
-
- The string IMPORTANT: will be colored red, as will menu directions that
- include "<something>-><something>":
-
- "File --> Open..."
-
- "Config->Preferences->Suffix Mappings…"
-
- 'Text -> Fill Paragraph'
-
- 'Alpha Developers Menu --> Marking --> Colour Headings Etc'
-
-
- Several variations are allowed, so long as <something>-><something> is
- surrounded by either single or double quotes.
-
-
- Hyperlinks
-
-
- Hyperlinks are created by the proc: help::colourHeadingsEtc, contained
- in "help.tcl".
-
-
- Hyperlinks to Installed Files
-
-
- To create a hyperlink to most .tcl files, include the file's name in quotes:
-
-
- "htmlMode.tcl"
-
-
- To create a hyperlink to most Help files, include the file's name in quotes:
-
-
- "Extending Alpha" "Alpha Manual" "Calculator Help"
-
-
- Help for specific packages can be hyperlinked in two ways. The first is to
- precede the package's name with 'package: ', as in package: latexAccents.
- The second way is to surround the package's name in quotes, and add ' Help'
- as in "recentFilesMultiMenu Help". Thus the BibTeX help file could be
- hyperlinked with all of
-
-
- "BibTeX Help" package: Bib "Bib Help"
-
- package: bibtexMenu "bibtexMenu Help"
-
-
- Completion files and Completion Tutorials can also be hyperlinked:
-
-
- "TclCompletions.tcl" "Text Tutorial" "C Tutorial.r"
-
-
- Hyperlinks to Examples
-
-
- To include an 'example' hyperlink, which will open any file in the Mode
- Examples folder in read-only format, simply put the file's name in quotes:
-
- "LaTeX-Example.tex"
-
- To open the example in a shell window, which will insert some explanatory
- comments at the top of the window and allow for any modifications without
- altering the original file, omit the dash preceding Example in the file's
- name:
-
- "LaTeX Example.tex"
-
- Note that examples which are opened in shell windows do not technically
- exist as files, and the window will not have any file suffix. This could
- disable some mode features that rely on file suffixes, and the window can
- not be sent to other applications.
-
- If you want to include an example that does something different than these
- two default routines, you must create a "<something>-Example.sfx.tcl" file.
- The alpha-specific modes use such scripts (i.e. "Compare Example" sources
- "Compare-Example.tcl"). These can also be adapted for package-specific
- tutorials, such as the tutorials
-
- "Filters Example" "Filters-Example.tcl" and
- "ManipCols Example" "ManipCols-Example.tcl"
-
- See some of the .tcl files in the "Mode Examples" folder for more examples.
-
-
- Hyperlinks to Prefs Files
-
-
- help::colourHeadingsEtc recognizes "<mode>Prefs.tcl" strings. Thus I
- can include the following lines in my "Statistical Modes Help" file:
-
- ----------------------------------------------------------------------
-
- To add keywords in a "SASPrefs.tcl" file, include the following commands:
-
- set SASuserCommands {
- blah blahdity etc
- }
-
- ----------------------------------------------------------------------
-
- Clicking on the "SASPrefs.tcl" link will prompt the user to create the
- file if necessary. The string "prefs.tcl" will similarly open the global
- preferences file.
-
-
- Hyperlinks to Hypertext
-
-
- Strings embedded in << >> will be treated as hypertext. For example,
-
-
- <<wwwParseFile [file join $HOME Help "Electric Corrections Help.html"]>>
-
- <<file::openDefault [file join $HOME Help "Electric Corrections Help.html"]>>
-
-
- will send the HTML manual to either Alpha's parser or a browser.
-
-
- Hyperlinks to Tcl Command Double-click
-
-
- When a file is in Tcl mode, command double-clicking on a defined procedure
- will open the file in which that proc is contained. In Help files, the
- string proc: <something> will create a hyperlink which does the same, as in
-
-
- proc: Tcl::DblClickHelper
-
-
- Very handy for Changes files ! This will also work for Alpha or Tcl
- commands, as in proc: regModeKeywords or proc: proc .
-
- (An alternative hyperlink "hint" is "command: ", as in command: append or
- command: abbrev . Note that proc: <string> and command: <string> do the
- exact same thing, following the orders of precedence in Tcl::DblClickHelper.)
-
-
- Hyperlinks for Web Applications
-
-
- Finally, email and url addresses surrounded by <> will be hyperized as
- well, as in <http://www.alpha.olm.net/> or <cupright@princeton.edu>.
-
-
- Exceptions
-
-
- There is an alternative marking routine, proc: help::markTclCommands, that
- is used in place of help::colourHeadingsEtc for certain files. See the
- proc: help::openFile for a list of the exceptions.
-
- These files will still hyperize e-mails and urls, but marks are based on
- any word which follows the string NAME, where NAME is the first word
- encountered on a line. (See "Tcl Commands" for an example.) Hyperlinks to
- additional files, however, are not possible. The only additional coloring
- provided is for lines which contain ALL CAP WORDS, and the file's "title".
-
- (The "Alpha Commands" file has it's own marking procedure as well, using
- proc: help::markAlphaCommands, which can not be used for any other file.)
-
- Important: These routines only apply to Help files in Text mode.
-
-
-
- ----------------------------------------------------------------------
-
-
- Tools to help write Auto-Hyperizing Files
-
-
- Using the guidelines outlined above, any "clean" Help file opened through
- the Help Menu will auto-mark / hyperize using the routines defined in the
- Alpha Developer's Menu. The window's "dirty" information for will then be
- set to "0", then the file will close and reopen. (See proc: help::openFile
- for details.)
-
- Please check all of your auto-marking hypers before releasing Help files!
-
- To color and mark files, or to remove hypers, use the menu items found in
- "Alpha Developers --> Help File Marking".
-
-
- ----------------------------------------------------------------------
-
-
- Building Alpha's Help Menu
-
-
- Items in the Help menu are added only if there is a valid file located in
- the Help file in the top level of Alpha's hierarchy. All file extensions
- are stripped from the name, and no duplicates are added. For example, if
- the Help folder includes
-
- Electric Corrections Help
- Electric Corrections Help.html
-
- only "Electric Corrections Help" is listed, but when the user tries to open
- it a list-pick dialog opens with both of them, plus the parser option
-
- Electric Corrections Help.www
-
- Alpha can currently send .html .pdf and .tex files to the appropriate
- helper application, using the proc: help::openDirect
-
- There are two "Help Menu" preferences that can help limit the options
- presented to the user: helpMenuOptions, and viewHtmlUsing. These are
- currently set using the "Config --> Preferences --> WWW" menu. If there is
- only one file, or if the preferences narrow down the options to only one
- format, it is sent automatically to the proc: help::openDirect.
-
-
- Exceptions -- .tcl files
-
-
- If there is a .tcl file associated with the Help menu item, such as a
- 'BibTeX Help.tcl' file in the example above, this file is immediately
- sourced. It is up to the script to decide if more options will be
- presented to the user -- the script can choose to ignore the Help Menu
- preferences or not. See the "HTML Help.tcl" or "LaTeX Help.tcl" files for
- some examples.
-
-
- Subdirectories in the Help folder
-
-
- In versions of Alpha/tk prior to 8.0, the name of any subdirectory in the
- Help folder is simply listed as another menu item. If there is no .tcl
- file associated with the menu item, selecting it will offer the user a
- list-pick dialog of all items within the subdirectory using the "Help Menu
- Options" preferences mentioned above.
-
- In versions 8.0, the name of the subdirectory will be inserted as a submenu
- listing the contents of the folder, unless there is an associated .tcl file
- present. In this case, the item will simply appear as another option (as
- above), and selecting it will immediately source the .tcl script.
-
- So in both versions, if the help file for a particular feature / mode etc
- is a complex .html suite (like the HTML mode manual), including a
- subdirectory named (for example)
-
- TclAEdoc
-
- as well as the script
-
- TclAEdoc.tcl
-
- will simply insert "TclAEdoc" in the Help menu, but allow its selection to
- do whatever the script wants, including opening any of the files within the
- TclAEdoc subdirectory.
-
-
-
- ----------------------------------------------------------------------
-
-
- Documenting Help Files
-
-
- Every Help file is a work in progress. Alpha's features change, and
- documentation that might seem perfectly clear to the programmer might
- make less sense to a user. I recommend the following guidelines for
- ensuring that documentation can (and will) be regularly updated:
-
- (1) Include version numbers on all help files.
-
- Ideally, this number would correspond to the version number of the mode /
- feature / menu / extension etc. explained in the Help file. This way
- future programmers and users will have a much better idea of when a Help
- file might need to be updated.
-
- (2) Use the Document Projects feature when writing Help files.
-
- This feature allows for files to automatically update "save" dates in the
- header. See the "Documentprojects Help" file for more information.
-
- (3) Include author / maintainer information for Help files.
-
- The author of the package is not necessarily the author of its associated
- Help file, and neither of these might be the person who is currently
- updating or maintaining the Help file. Please give credit where it is due,
- and include information on where one can send suggestions on the Help file.
- This will make updates much more likely to occur.
-
- (4) Include any license and disclaimer notes somewhere in the file.
-
-
- ----------------------------------------------------------------------
-
-
- License and Disclaimer
-
-
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
-
- Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
-
- Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
-
- This software is provided by the copyright holders and contributors "as is"
- and any express or implied warranties, including, but not limited to, the
- implied warranties of merchantability and fitness for a particular purpose
- are disclaimed. In no event shall the regents or contributors be liable
- for any direct, indirect, incidental, special, exemplary, or consequential
- damages (including, but not limited to, procurement of substitute goods or
- services; loss of use, data, or profits; or business interruption) however
- caused and on any theory of liability, whether in contract, strict
- liability, or tort (including negligence or otherwise) arising in any way
- out of the use of this software, even if advised of the possibility of such
- damage.
-
- --------
-
- This package is free. Alpha is shareware ! <<register>>
-
-
- Feel free to send me any bugs, comments, or suggestions on this file.
-
- cheers,
-
-
- -- cbu
-
-
- Author: Craig Barton Upright
- E-mail: <cupright@princeton.edu>
- mail: Princeton University, Department of Sociology
- Princeton, New Jersey 08544
- www: <http://www.princeton.edu/~cupright/>
-
-